'''
Created on 8 Nov 2014

@author: User
'''
from main.data.my_enums import Timeframe
from datetime import datetime;

class Prices:
    
    
    
    def __init__(self,dates,opens,highs,lows,closes,volumes,tf = Timeframe.DAILY):
        self.datenum=dates;
        self.opens=opens;
        self.closes=closes;
        self.highs=highs;
        self.lows=lows;
        self.volumes=volumes;
        self.tf=tf;
        self.datestrings = [];
        for num in self.datenum:
            dt = datetime.fromordinal(int(num));
            self.datestrings.append(dt.strftime("%Y-%m-%d"));
            
        
        
    def reverse(self):
        self.highs = self.highs[::-1];
        self.opens = self.opens[::-1];
        self.lows = self.lows[::-1];
        self.volumes = self.volumes[::-1];
        self.datestrings = self.datestrings[::-1];
        self.datenum = self.datenum[::-1];
        
        
        